var ul = document.querySelector(".ul");
var li1 = document.querySelectorAll(".li1");
var a = 0;
var b = 0;
for (var i = 0; i < li1.length; i++) {
    li1[i].index = i;
    li1[i].onmouseover = function () {
        a = this.index;
        b = this.index;
        for (var i = 0; i < li1.length; i++) {

            li1[i].className = "li1"
        }
        this.className = "li1 on"
        var bourn = a * -1903;
        move(ul, bourn)
    }
}
var have = document.querySelector(".have");
have.onmouseover = function () {
    clearInterval(o);
}
have.onmouseout = function () {
    p();
}
function p() {
    o = setInterval(function () {
        a++;
        b++;
        if (a > 2) {
            ul.style.left = -1903
            a = 0
        }
        if (b > 2) {
            b = 0
        }
        for (var i = 0; i < li1.length; i++) {
            li1[i].className = "li1"
        }
        li1[b].className = "li1 on"
        var bourn = a * -1903;
        move(ul, bourn)
    }, 5000)
}
p();































var ul1 = document.querySelector(".ul1");
var last = document.querySelector(".last");
var next = document.querySelector(".next");
var li2 = document.querySelectorAll(".li2");
var sign_center = document.querySelector(".sign-center");


var c = 1;
var d = 0;
for (var i = 0; i < li2.length; i++) {
    li2[i].index = i;
    li2[i].onmouseover = function () {
        d = this.index;
        c = (this.index) + 1;
        console.log(this.index);
        for (var i = 0; i < li2.length; i++) {
            li2[i].className = "li2";
        }
        this.className = "li2 l";
        var a = c * -600;
        move(ul1, a);
    }
}
next.onclick = function () {
    c++;
    d++;
    if (c > 3) {
        ul1.style.left = 0;
        c = 1;
    }
    if (d > 2) {
        d = 0;
    }
    for (var i = 0; i < li2.length; i++) {
        li2[i].className = "li2";
    }
    li2[d].className = "li2 l";
    var a = c * -600;
    move(ul1, a);
}

$(".next").mouseover(function () {
    $(this).css({
        "background-color": "#2b2b2b",
        "opacity": 1,
    })
})
$(".next").mouseout(function () {
    $(this).css({
        "background-color": "#a7a7a7",
        "opacity": 0.6,
    })
})

last.onclick = function () {
    c--;
    d--;
    console.log(ul1.style.left);
    if (c < 0) {
        ul1.style.left = "-1800px";
        c = 2;
    }
    if (d < 0) {
        d = 2;
    }
    for (var i = 0; i < li2.length; i++) {
        li2[i].className = "li2";
    }
    li2[d].className = "li2 l";
    var a = c * -600;
    move(ul1, a);
}
$(".last").mouseover(function () {
    $(this).css({
        "background-color": "#2b2b2b",
        "opacity": 1,
    })
})
$(".last").mouseout(function () {
    $(this).css({
        "background-color": "#a7a7a7",
        "opacity": 0.6,
    })
})
sign_center.onmouseover = function () {
    last.style.display = "block";
    next.style.display = "block";
    clearInterval(ul1.auto);
}

sign_center.onmouseout = function () {
    last.style.display = "none";
    next.style.display = "none";
    autoplay();
}
autoplay();
function autoplay() {
    ul1.auto = setInterval(function () {

        next.onclick();

    }, 4000)
}
















var label = document.querySelector("label")
var qizhi = 0
label.onclick = function () {
    if (qizhi == 0) {
        this.style.background = "url(./images//checkbox_12x12.png) 0 2px no-repeat"
        qizhi = 1
    } else if (qizhi == 1) {
        this.style.background = "url(./images/checked_solid_12x12.png) 0 2px no-repeat"
        qizhi = 0
    }
}

// $("label").mouseover(function () {
//     $(this).css({
//         "background-image": "url(./images/checkbox_cur_12x12.png)",
//         "background-position": "0 2px",
//         "background-repeat": "no-repeat",
//         "cursor": "pointer",
//         "color": "#f42424",
//     })
// })
// $("label").mouseout(function () {
//     $(this).css({
//         "background-image": "url(./images/checkbox_12x12.png)",
//         "background-position": "0 2px",
//         "background-repeat": "no-repeat",
//         "cursor": "pointer",
//         "color": "#f42424",
//     })
// })

















$(".abc").click(function(){
    $(".pb").css({
        "display":"block"
    })
})


$(".pb-hd i").click(function(){
    $(".pb").css({
        "display":"none"
    })
})
